/***********************************************************************************************************************************
 * Name:	deadlock-resource.sql
 * Author:	Frank Figearo (frank.figearo@us.bbaaviation.com|frank@sqlnerd.me)
 * Summary:	Get information on the deadlocked resource.
 */
SET IMPLICIT_TRANSACTIONS OFF; IF 0 < @@TRANCOUNT ROLLBACK;
GO

DECLARE @partition_id BIGINT= 0;
SELECT
	TableName			= OBJECT_NAME(p.[object_id]), 
	IndexName			= i.name,
	IsPageLockDisallowed= INDEXPROPERTY(p.[object_id], i.name, 'IsPageLockDisallowed'),
	IsRowLockDisallowed	= INDEXPROPERTY(p.[object_id], i.name, 'IsRowLockDisallowed')
  FROM sys.partitions AS p
	INNER JOIN sys.indexes AS i ON (p.[object_id] = i.[object_id] AND p.index_id = i.index_id )
  WHERE [partition_id] = @partition_id
GO